package com.mt.repair.entity.repairManagement;

import javax.persistence.*;
import java.io.Serializable;
import com.mt.common.core.annotation.DColumn;
import com.mt.common.core.annotation.DEntity;
import com.mt.common.core.web.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;



import com.mt.common.system.entity.User;
import java.util.List;

@DEntity(label="通知公告",comment="",moduleLabel="报修管理")
@Entity(name="repair_notice")
@Table(name = "repair_notice" , indexes = { @Index(name = "index_notice_type", columnList = "notice_type")  })
@ApiModel(description = "维修评价:")
public class Notice extends BaseEntity implements Serializable{
	private static final long serialVersionUID = 1L;

	@DColumn(index=3,label="通知标题",comment="通知标题",component="文本",where=false)
	@ApiModelProperty(value = "通知标题:通知标题")
	@Column(name="title",length=255,nullable=true,unique=false)
	private String title;

	@DColumn(index=4,label="通知内容",comment="通知内容",component="文本",where=false)
	@ApiModelProperty(value = "通知内容:通知内容")
	@Column(name="content",length=255,nullable=false,unique=false)
	private String content;

	@DColumn(index=5,label="通知类型",codeTable="通知类型",codeTableOptions="部分,角色,所有",comment="通知的用户类型，指定部分还是分角色",component="字典下拉单选",where=true)
	@ApiModelProperty(value = "通知类型:通知的用户类型，指定部分还是分角色")
	@Column(name="notice_type",length=255,nullable=false,unique=false)
	private String noticeType;

	//如果通知类型是部分，则该字段代表的是用户的id（用逗号隔开），如果通知类型是角色，则该字段是角色集合
	//@Transient
	@DColumn(index=5,label="通知集合",comment="如果通知类型是部分，则该字段代表的是用户的id（用逗号隔开），如果通知类型是角色，则该字段是角色集合",component="文本",where=true)
	@ApiModelProperty(value = "通知类型:通知的用户类型，指定部分还是分角色")
	@Column(name="selected_string",length=255,nullable=false,unique=false)
	private String selectedString;

	@DColumn(index=6,label="是否发布",comment="0代表否，1代表发布",component="数字，整数",where=false)
	@ApiModelProperty(value = "是否发布:0代表是，1代表否")
	@Column(name="pulish",length=255,nullable=true,unique=false)
	private Integer pulish;

	@Transient
	private Integer readStatus;

	@Transient
	private List<User> noticeUsers;

	public String getSelectedString() {
		return selectedString;
	}

	public void setSelectedString(String selectedString) {
		this.selectedString = selectedString;
	}

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getNoticeType() {
		return this.noticeType;
	}

	public void setNoticeType(String noticeType) {
		this.noticeType = noticeType;
	}

	public Integer getPulish() {
		return this.pulish;
	}

	public void setPulish(Integer pulish) {
		this.pulish = pulish;
	}

	public List<User> getNoticeUsers() {
		return this.noticeUsers;
	}

	public void setNoticeUsers(List<User> noticeUsers) {
		this.noticeUsers = noticeUsers;
	}

	public Integer getReadStatus() {
		return readStatus;
	}

	public void setReadStatus(Integer readStatus) {
		this.readStatus = readStatus;
	}
}
